Given two arbitrary constants, \(\alpha_1\) and \(\alpha_2\), and two arbitrary images \(f_1\left(x,y\right)\) and \(f_2\left(x,y\right)\), \(\varkappa\) is said to be a linear operator if:
Taken from: Gonzalez, Rafael C., y Richard E. Woods. Digital Image Processing. New York, NY: Pearson, 2018.
Basic Mathematic - Pixel intensity
Taken from: Gonzalez, Rafael C., y Richard E. Woods. Digital Image Processing. New York, NY: Pearson, 2018.
Neighborhood operations
Taken from: Gonzalez, Rafael C., y Richard E. Woods. Digital Image Processing. New York, NY: Pearson, 2018.
Neighborhood operations
Neighborhood operations
Neighborhood operations
Neighborhood Operations
For example, suppose that the specified operation is to compute the average value of the pixels in a rectangular neighborhood of size mn × centered on \(\left(x,y\right)\). The coordinates of pixels in this region are the elements of set \(S_{xy}\).
Purpose: Basic smoothing (box filter). Effect: Reduces high-frequency noise and blurs edges. Notes: Linear and separable if implemented as two 1D averages; normalize by kernel sum.
Purpose: Weighted smoothing around the center. Effect: Attenuates noise while preserving edges better than the mean filter. Notes: Approximates a discrete Gaussian; often used before edge detection.
Purpose: Estimate gradient along (x) and (y). Effect: Highlights horizontal and vertical edges; used for magnitude (). Notes: Includes implicit smoothing; more robust to noise than Prewitt.
Purpose: Enhance abrupt transitions (zero-crossings). Effect: Isotropic edge detection; very sensitive to noise. Notes: Often preceded by smoothing (LoG/DoG). May introduce halos.
Purpose: Reinforce high-frequency components (details). Effect: Produces a crisper image; enhances edges and textures. Notes: Equivalent to adding the original image with a high-pass component; watch for saturation and noise.
Purpose: Diagonal gradient (45°/135°). Effect: Detects diagonal edges quickly. Notes: Very noise-sensitive; useful in real-time or hardware systems due to small size.
Calculate Histogram: Calculate the histogram of the original image, showing the frequency distribution of each intensity level.
Calculate Cumulative Distribution Function (CDF): Calculate the cumulative distribution function (CDF) of the histogram. The CDF represents the cumulative sum of frequencies for each intensity level.
Equalization: For each pixel in the original image, calculate the new intensity value using the formula: \[New_value = (CDF(old value) * (L-1))\] where L is the number of intensity levels (e.g., 256 for an 8-bit image).
Assign New Values: Assign the new intensity values calculated in step 3 to the equalized image.
Step 1: Calculate Histograms Compute the histograms of the source image (Hs) and target image (Ht) for intensity values (r).
Step 2: Calculate CDFs Compute the cumulative distribution functions (CDFs) for the source image (CDFs) and target image (CDFt).
Step 3: Establish Correspondence Find the corresponding intensity values between the source and target images using the inverse CDF of the target image.
Step 4: Apply Transformation Apply the intensity transformation to the source image using the established correspondence.
Step 5: Verify Similarity Calculate the mean absolute difference between the transformed source image and the target image to verify their similarity.